package cn.wp.ewallet.wallet.scheduler;

import cn.wp.common.core.plugin.scheduler.SchedulerRunnable;
import cn.wp.common.core.plugin.scheduler.SchedulerTask;
import cn.wp.common.core.util.ApplicationContextUtil;
import cn.wp.ewallet.wallet.service.AutoCollectService;
import cn.wp.ewallet.wallet.service.SyncAssetsService;

/**
 * 同步账户信息
 * Created by zhangyongli on 2020/2/6
 */

public class SyncAssetsRunnable extends SchedulerRunnable {

    public SyncAssetsRunnable(SchedulerTask schedulerTask) {
        super(schedulerTask);
    }

    @Override
    public void runStart() {
        SyncAssetsService syncAssetsService = ApplicationContextUtil.getBean(SyncAssetsService.class);
        syncAssetsService.execute();

    }

    @Override
    public void runFinish(SchedulerTask schedulerTask) {
        logger.info("同步账户信息完成");
    }
}
